package io.github.talelin.latticy.dto.rule.chargeCondition;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
import java.util.List;

/**
 * @authoer:wulongbo
 * @createDate:2022/9/14
 * @description:
 */
@Data
public class ChargeRuleUpdateDTO {

    /**
     * 规则id
     */
    @Positive
    private Integer id;

    /**
     * 规则id
     */
    @Positive
    private Integer ruleId;

    /**
     * 基础费用
     */
    @DecimalMin(value = "0.00", message = "{charge.baseCost.error}")
    @NotNull(message = "{charge.baseCost.not-null}")
    private BigDecimal baseCost;

    @Valid
    private List<ChargeConditionUpdateDTO> conditionList;

    @Valid
    private List<ChargeAbsoluteUpdateDTO> absoluteList;
}
